<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>重复个案管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		 function reset(){
				
				$("#searchForm").reset();
				var selectVal = $("form:select");
				for(var i=0;i<selectVal.lengeth;i++){
					selectVal[i].options[0].selected= true;
				}
		} 
		 
		
		 function doDelete(){
				
			 text = $("input[name='checkbox']:checked").map(function(index,elem){
				 return $(elem).val();
				 
			 }).get().join(',');
			//alert("选中的值为"+text);
			var url = "${ctx}/order/bsVaccineOrder/doDelete";
			$.ajax({
				url: url,
				data: {"ids" : text},
				type : "post",
				success : function(data){
					location.href= "${ctx}"+data;
				}
				
			});
		
		}
		 
		 function search(){
			 if($("#orderType").val()==""){
				return;
			 }else{
				 $("#searchForm").submit();
			 }
		 }
		 
		 function del(){
			
			$("#del").parent().prev().text($("#dd").text()-1);
		 }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/order/bsVaccineOrder/">重复个案查询</a></li>
		
	</ul>
	<form:form id="searchForm" modelAttribute="bsVaccineOrder" action="${ctx}/vaccinate/repeatCase/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label><a style="color:red">*</a>查询类型：</label>
				<form:select path="orderType" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('bs_order_ordertype')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>

			<li><label>儿童姓名：</label>
				<form:select path="type" class="input-medium">
					<form:option value="" label="--请选择--"/> 
					<form:options items="${fns:getDictList('bs_product_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			
			<li><label>出生日期：</label>
				<input name="beginVaccExpDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${bsOutAndIn.beginVaccExpDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> - 
				<input name="endVaccExpDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${bsOutAndIn.endVaccExpDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			
			<li><label>户籍所在地：</label>
				<form:select path="vaccineid" class="input-medium" onchange="change()">
					<form:option value="" label="--请选择--"/>
					<form:options items="${vaccinates}" itemLabel="name" itemValue="id" htmlEscape="false"/>
				</form:select>
			</li>
			
			<li><label>性别：</label>
				<form:select path="companyName" class="input-medium">
					<form:option value="" label="--请选择--"/> 
					<form:options items="${companys}" itemLabel="companyName" itemValue="companyName" htmlEscape="false"/>
				</form:select>
			</li>
			
			<li><label>母亲姓名：</label>
				<form:select path="batchno" class="input-medium">
					<form:option value="" label="--请选择--"/> 
					<form:options items="${products}" itemLabel="batchno" itemValue="batchno" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>父亲姓名：</label>
				<input type="text" name="orderNo" class="input-medium"/>
			</li>
			
		</ul>
		<br/>
		<ul class="ul-form">
		<li class="btns"><input id="btnSubmit" class="btn btn-primary" onclick="search()" type="button" value="查询"/></li>
		<li class="btns"><input onclick="reset()"  class="btn btn-primary" type="button" value="重置"/></li>
		<li class="btns"><input onclick="down()" class="btn btn-primary" type="button" value="导出"/></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<shiro:hasPermission name="order:bsVaccineOrder:edit"><th>操作</th></shiro:hasPermission>
				<th>儿童姓名</th>
				<th>出生日期</th>
				<th>儿童编码</th>
				<th>性别</th>
				<th>母亲姓名</th>
				<th>父亲姓名</th>
				<th>出生医院</th>
				<th>民族</th>
				<th>居住通讯地址</th>
				<th>户籍属性</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="bsVaccineOrder">
			<tr>
				<shiro:hasPermission name="order:bsVaccineOrder:view"><td>
    				<a href="${ctx}/order/bsVaccineOrder/form?id=${bsVaccineOrder.id}">查看</a>
					<a href="javascript:del();" id="del" >删除</a> 
				</td></shiro:hasPermission>
				<td>1</td>
				<td>2</td>
				<td>3</td>
				<td>4</td>
				<td>5</td>
				<td>6</td>
				<td>7</td>
				<td>8</td>
				<td>9</td>
				<td>10</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>